package day04;
import java.util.Scanner;
public class YearTest {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        System.out.println("请输入起始年份：");
        int year1= scan.nextInt();
        System.out.println("请输入截止年份");
        int year2 = scan.nextInt();
        int count=0;
        for(int i=year1;i<=year2;i++){
            if((i%4==0&&i%100!=0) || i%400==0){
                System.out.print(i+" ");
                count++;
                if (count%10==0){
                    System.out.println();
                }
            }
        }
    }
}
